package utileria;

import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

public class Boton extends javax.swing.JButton
{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private GridBagConstraints c = new GridBagConstraints();
	public Boton(int posicionX, int posicionY, int widhtX, String texto,JPanel panel,ActionListener evento) 
	{
		super(texto);
		c.gridx = posicionX;
		c.gridy = posicionY;
		c.insets = new Insets(30, 0, 0, 0);
		c.gridwidth = widhtX;
		c.anchor = GridBagConstraints.CENTER;
		this.addActionListener(evento);
		panel.add(this, c);
	}
}
